home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20031118-20041115
/
000089_slash_dev_slas…_2000@yahoo.com_Wed Jan 28 11:22:57 2004.msg
< prev
next >
Wrap
Internet Message Format
|
2004-11-14
|
3KB
Path: newsmaster.cc.columbia.edu!panix!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
From: slash_dev_slash_null_2000@yahoo.com (Mark Sapiro)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Help with a script
Date: 27 Jan 2004 21:57:46 -0800
Organization: http://groups.google.com
Lines: 47
Message-ID: <deb126db.0401272157.32647b1b@posting.google.com>
References: <6b84683a.0401271212.4059fe85@posting.google.com>
NNTP-Posting-Host: 209.182.169.133
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1075269466 1157 127.0.0.1 (28 Jan 2004 05:57:46 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 28 Jan 2004 05:57:46 +0000 (UTC)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14789
ebh@burntmail.com (EBH) wrote in message news:<6b84683a.0401271212.4059fe85@posting.google.com>...
> From what I currently know, I understand that after successfully
> logging in, I can issue the "connect" command which will transfer
> control from the script to the user. I need to know how to pick it up
> again when required by a screen prompt (Iniitate you KERMIT, or
> whatever). And as mentioned above I still to know when the remote
> system disconnects so that I can end execution of the script.
If it's acceptable for the remote host to tell the user what to do, it
can tell the user to escape back to command mode by typing the Kermit
connect mode escape character followed by "c". You don't say what
Kermit the user will be using, but if it is Kermit-95, the user can
also normally return to command mode with Alt-x, but this can be
changed by assigning the \Kexit verb to a different key.
The connect mode escape character can be set with the command
set escape-character
(help set escape-character for more info). The default escape
character in C-Kermit is control-\ in Kermit-95 it's control-]
When the user escapes back to command mode, the script will pick up
with the command following the connect.
You might also be able to use Kermit's autodownload/autoupload
features to bypass the user's need to escape to command mode. In this
case, if the remote host attemps to "send" or "get" a file to/from the
local Kermit, the local Kermit will switch from connect mode to server
mode automatically to receive/send the file(s).
There are various ways to tell if the remote disconnects if the script
is executing. You should always test all commands for success or
failure anyway, and any command that communicates with the host will
fail if the connection is gone. Also, you can explicitly use the
condition "open connection" as in
if open connection ...
while open connection ...
to test the connection in the script.
Normally if a disconnect occurs in conect mode, Kermit returns to
command mode (to the script in your case) so you could test for this
with something like
connect
if not open connection exit ; or end as appropriate
--
Mark Sapiro msapiro -at- value net The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan